home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk152 / find / find.doc < prev    next >
Text File  |  1995-03-19  |  6KB  |  156 lines

  1.  
  2. FIND, Copyright © 1989, by Larry Phillips.
  3.  
  4. This program may be freely distributed, in its entirety only,
  5. including updatedb, find, and find.doc.  No chage may be made for
  6. this program beyond a reasonable media charge. It may be distributed
  7. on any public or private BBS or telecommunication service, provided
  8. there are no extra charges for downloading, beyond normal connect
  9. time fees.
  10.  
  11. If you use find, and like it, if it saves you time, or if you have
  12. comments, criticisms or a wish list, please send me a postcard from
  13. where you live. Consider the cost of the postcard and stamp a
  14. shareware fee. If I could include the card and stamp in the
  15. distribution, I would.
  16.  
  17. Send to:
  18.  
  19.     Larry Phillips
  20.     3575 E. 28th Ave.
  21.     Vancouver, BC, Canada
  22.     V5R 1T4
  23.  
  24. -------------------------------------------------------------
  25.  
  26. UPDATEDB:  creates the files used by find
  27. ---------
  28.  
  29.   Updatedb will create a file called 'find.codes' in a directory
  30. called 'FindDB:'.  It will take a while, so don't panic (it takes
  31. about 4 1/2 minutes on my setup, but the time taken will depend
  32. entirely on how many directories and files you are catalogging).  The
  33. file created will only match the actual contents of your partitions
  34. until you save, delete, or move files around, but it is a simple
  35. matter to run updatedb once a day (more or less, depending on your
  36. disk activity, and how long you can remember the changes you make on
  37. your disks).
  38.  
  39. Syntax: updatedb [ [-v] dhn: dhn: ...]
  40.  
  41.    dhn:  device name.
  42.  
  43.     -v:  verbose mode. This is a debuggin feature for updatedb, in
  44.          case you have a problem with a partition or filename. It
  45.          will show you which directory it was working on when it
  46.          failed. The directory names are sent to the screen,
  47.          delimited with vertical bars ('|'), in a different colour.
  48.          The -v option is used only when entering the partition names
  49.          on a command line.
  50.  
  51. Examples:  updatedb            ; take arguments from FindDB:find.config
  52.            updatedb dh0: dh1:  ; catalog dh0: and dh1:
  53.            updatedb -v dh1:    ; catalog dh1:, verbose.
  54.  
  55. If you specify partitions on the command line, they will be used to
  56. generate the find.codes file.  If you don't specify partitions,
  57. updatedb will look for a file in your 'FindDB:' directory called
  58. 'find.config'.  This file should have _only_ one line in it,
  59. consisting of the partitions you want to include in the catalog,
  60. separated by spaces.  In either case, the last partition named in
  61. 'find.config' or on the command line will be the first one processed,
  62. so you should put them in order of least likely to most likely to be
  63. searched.
  64.  
  65. updatedb may be stopped by typing a CTRL C. It will stop after
  66. processing the directory it is working on.
  67.  
  68.  
  69. find.codes:  This is a straightforward file, consisting of directory
  70. names and file names, separated by NULL bytes.  (hex 00).  Directory
  71. names will always end with a colon (':') or a slash ('/').  The order
  72. is as follows:
  73.  
  74. dirname/ NULL filename NULL filename NULL dirname/ NULL filename NULL ...
  75.  
  76.             =================================
  77.  
  78. FIND:  find files and directories on hard disk
  79. -----  
  80.  
  81.   Find  uses a database file called 'find.codes', to quickly find any
  82.   directory or file.  These two files are created by the companion
  83.   program 'updatedb'.
  84.  
  85.   Output from the program may be halted at any time by pressing
  86.   CTRL C. I debated a long time on where to check for the CTRL C, for
  87.   speed considerations,and finally decided to check only when a match
  88.   was detected, and right after the directory search.  This means
  89.   that the directory will be completely searched if there are no
  90.   matches. It ends pretty quickly anyway (see comments on speed
  91.   below).
  92.  
  93. Syntax: find [-e] string
  94.  
  95.   string :  the string to match.  Without the '-e' argument, the
  96.             string need only be contained in the directory or file
  97.             entry.  For example, the string 'game' will match
  98.             'game', 'games', or 'endgames'.  See '-e' below for
  99.             exact matches.
  100.  
  101.       -e :  Optional, [E]xact.  Matches directories and filenames
  102.             only if the string argument matches exactly.  For
  103.             example, the argument 'game' will not match a directory
  104.             or file named 'games'
  105.  
  106.             =================================
  107.  
  108. Setting it up
  109. -------------
  110.  
  111.   Find and updatedb contain a few 'hardwired' assumptions.
  112.  
  113.   The first assumption:  I have an assigned directory called 'FindDB:'
  114. You can set up a directory like this, and make the assignment, or if
  115. you wish to have your find files elsewhere, use a file zapper to
  116. change the path/filename in both programs.  I welcome suggestions on
  117. how best to set up the configurability.
  118.  
  119.   The second assumption is only in updatedb, and that is that if no
  120. command line arguments are given, it looks for them in
  121. 'FindDB:find.config'
  122.  
  123.             =================================
  124.  
  125. Everyday usage:
  126. ---------------
  127.  
  128.   I usually run updatedb once per day, either before going to bed or
  129. before going to work.  It would be a good candidate for putting in a
  130. crontab to run at some time you will not be using the machine.
  131.  
  132.   Find is extremely fast, especially when compared with searching a
  133. disk with DIR or LIST.  If I invoke it with a string that I know will
  134. not be found (eliminating screen output time), it will do a complete
  135. search in between 2 and 7 seconds, depending on the length of the
  136. pattern searched for (longer patterns take less time).  Before you
  137. groan and tell me that isn't fast, let me tell you about my find
  138. files and disk partitions...
  139.  
  140. My FindDB:find.codes is 133351 bytes long, consisting of 1174
  141. directory entries and over 10,000 file entries
  142.  
  143.   If you are anything like me, you forget where things are, and
  144. waste a lot of time looking for them.  On my current setup, it would
  145. take me over 5 minutes to do a 'dir all' of all partitions, and more
  146. time still to search the output for the file I want.  The disk space
  147. overhead in having the find files is quite small.
  148.  
  149.             =================================
  150.  
  151. Enjoy!
  152.  
  153. Larry Phillips: CIS -  76703,4322
  154.                 Usenet - lphillips@lpami.wimsey.bc.ca
  155.                       or uunet!van-bc!lpami!lphillips
  156.